using System;
using System.Collections.Generic;
using System.Text;
using DAO;
using DTO;
using System.Data;

namespace BUS
{
    public class DiaDiemBUS
    {
        public static DataTable LayThongTinDiaDiemNhanHang()
        {
            DataTable dt =DiaDiemDAO.LayThongTinDiaDiemNhanHang();
            return dt;
        }
        public static DataTable LayThongTinKhuVuc()
        {
            DataTable dt = DiaDiemDAO.LayThongTinKhuVuc();
            return dt;
        }
        public static DataTable LayThongTinVuaNhap(string MaDiaDiem)
        {
            DataTable dt = DiaDiemDAO.LayThongTinVuaNhap(MaDiaDiem);
            return dt;
        }
        #region 1. Inserting Dia Diem
        public static bool InsertDiaDiem(DiaDiemDTO diadiem)
        {
            if (DiaDiemDAO.KiemTraNhapDiaDiem(diadiem.MaDiaDiem) == true)
            {
                return false;
            }
            return DiaDiemDAO.NhapDiaDiem(diadiem);

        }
        #endregion
    }
}
